package com.sxbbc.common.core.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * 扫描内部二维码跳转类型
 * @author xiaoky
 * @date 2019-06-17
 */
public enum ScanQrEnums {
	OFFLINE_BUS("offlineBus", "线下商家");
	
	private String type;
    private String name;

    ScanQrEnums(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static List<ScanQrEnums> queryList() {
        List<ScanQrEnums> list = new ArrayList<ScanQrEnums>();
        for (ScanQrEnums o : ScanQrEnums.values()) {
            list.add(o);
        }
        return list;
    }

    public static String getName(String type) {
        String str = "";
        for (ScanQrEnums o : ScanQrEnums.values()) {
            if (o.getType().equals(type)) {
                str = o.getName();
                break;
            }
        }
        return str;
    }
}
